package com.example.campus.pojo.dto;

import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
public class UserInfoDTO implements Serializable {
    @NotEmpty
    @Pattern(regexp = "^\\S{5,16}$")
    private String username;

    @NotEmpty
    private String name;

    @NotEmpty
    @Pattern(regexp = "^1[3-9]\\d{9}$")
    private String phone;

    private String avatarPath;

    @Email
    private String email;

    private String sex;
}
